<?php

namespace app\api\controller;

use app\api\service\OrderService;
use app\common\model\Alipay;
use app\common\service\order\CouponOrderService;
use app\common\service\pay\alipay\AliPayBase;
use app\common\service\pay\alipay\AliPayWap;
use app\common\service\pay\wechat\WechatBase;
use app\event\PaySuccess;
use app\model\PayLog;
use GaoweiSpace\MeituanPubUnion\Exception\Exception;
use think\facade\Db;
use think\facade\Log;
use think\facade\Request;
use Yansongda\Pay\Pay;

class NotifyV3
{

    /**
     * 微信
     * @return \Symfony\Component\HttpFoundation\Response
     * @throws \EasyWeChat\Kernel\Exceptions\Exception
     */
    public function wxpayNotify()
    {
        Log::info('到了回调-微信');

        $res = (new CouponOrderService())->notify(new WechatBase());

        return $res;

    }

    /**
     * 支付宝回调
     */
    public function alipayNotify()
    {
        Log::info('到了回调-支付宝');
        $res = (new CouponOrderService())->notify(new AliPayBase());

        return $res;
    }

}